package holiday_demo;

public class Switch_text {
    public static void main(String[] args) {
        float x=2.4f;
        int a=0;
        switch ((int)x){
            case 1:a++;
            case 2:a+=2;
            break;
            case 3:a+=3;
        }
        System.out.println(a+"\n");
        StringBuffer s=new StringBuffer("Hello");
        if((s.length()>=5)&& (s.append("there").equals("False")))
            s.replace(0,6,"False");
        System.out.println(s);
        String s1="abc"+"def";
        String s2=new String(s1);
        if (s1==s2)
            System.out.println("地址相同");
    }
}
